/*
 * @Author: Soulmate
 * @Date: 2023-09-12 09:14:43
 * @LastEditTime: 2023-09-12 10:10:29
 * @LastEditors: Soulmate
 * @Description: 
 * @FilePath: \ruoyi-ui-vue3\vite\plugins\unplugin-components.ts
 * 版权声明
 */
import Components from 'unplugin-vue-components/vite';
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';

export default function createUnpluginComponents() {
  return Components({
      dirs: ['src/components'],
        // allow auto load markdown components under `./src/components/`
      extensions: ['vue', 'md'],
      // allow auto import and register components used in markdown
      include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
      resolvers: [
        ElementPlusResolver({
          importStyle: 'sass'
        })
      ],
      dts: "src/types/components.d.ts"
    })
}
